<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>angular</title>
</head>
<body>
<div ng-app="myApp">
	<div ng-controller="myappCtrl">
		<input type="text" ng-model="search">
		<table border="1" width="100%" style="font-size: 16px;text-align: center;">
			<thead>
				<tr>
					<th>id</th>
					<th>class</th>
					<th>title</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="(key, value) in lists">
					<td>{{value.id}}</td>
					<td>{{value.class}}</td>
					<td>{{value.title}}</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>

<script type="text/javascript">
	document.getElementsByTagName('html')[0].style.fontSize=window.screen.width/10+'px';
</script>
<script src="angular.min.js"></script>
<script src="angular-ui-router.js"></script>
<script type="text/javascript">
	var app =angular.module('myApp', []);
	app.controller('myappCtrl', function ($scope,$filter) {
		$scope.data=[
			{id:32,class:"sdhjsdhjf",title:"sdv题目一"},
			{id:45,class:"sdgfdkm",title:"d题目一"},
			{id:423,class:"kjkkjc",title:"dfv题目一"},
			{id:57,class:"nsocsd",title:"as题目一"},
			{id:32,class:"wqsg",title:"jh题目一"}
		];
		$scope.lists=$scope.data;
		$scope.$watch('search',function(n,o){
			console.log(n);
			$scope.lists=$filter('filter')($scope.data,n);
		})
	})
</script>
</body>
</html>
<!--应该是14.11，时间-2017-05-08->